package rs.udd.web.controller;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class ErrorController {

	private static final Logger LOGGER = LogManager.getLogger(ErrorController.class);

	@RequestMapping(value = "/403", method = RequestMethod.GET)
	public String error403() {

		LOGGER.info("ErrorController.error403()");

		return "/error/403";
	}

	@RequestMapping(value = "/404", method = RequestMethod.GET)
	public String error404() {

		// TODO Nikola route application through this method
		LOGGER.info("ErrorController.error404()");

		return "/error/404";
	}

	@RequestMapping(value = "/405", method = RequestMethod.GET)
	public String error405() {

		// TODO Nikola route application through this method
		LOGGER.info("ErrorController.error405()");

		return "/error/405";
	}

	@RequestMapping(value = "/500", method = RequestMethod.GET)
	public String error500() {

		// TODO Nikola route application through this method
		LOGGER.info("ErrorController.error500()");

		return "/error/500";
	}

}
